'------------------------------
' Hien thi 5 tin moi nhat
'------------------------------
Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports DotNetNuke
Imports NVPortal.Modules.NVNews
Namespace NVPortal.Modules.NVNews

    Public MustInherit Class Lastsed_Comment
        Inherits Entities.Modules.PortalModuleBase

#Region "Event Handlers"
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Try
                If Not IsPostBack Then
                    Dim ctlFeedBackNews As New NV_NewsFeedbackController
                    Dim arrFeedBackNews As ArrayList
                    arrFeedBackNews = ctlFeedBackNews.GetTop
                    Me.drgFeedBackNews.DataSource = arrFeedBackNews
                    Me.drgFeedBackNews.DataBind()
                End If
            Catch ex As Exception
                'Me.imgNews.Visible = False
                'Exception
                ProcessModuleLoadException(Me, ex)
            End Try
        End Sub
        Function GetTitleNews(ByVal Newsid As Integer) As NV_NewsInfo
            Dim ctlTitleFeed As New NV_NewsController
            Dim objTitleFeed As NV_NewsInfo
            objTitleFeed = ctlTitleFeed.GetByID(Newsid)
            Return objTitleFeed
        End Function
        Function GetIMGNews(ByVal Newsid As Integer) As NV_NewsInfo
            Dim ctlTitleFeed As New NV_NewsController
            Dim objTitleFeed As NV_NewsInfo
            objTitleFeed = ctlTitleFeed.GetByID(Newsid)
            Return objTitleFeed
        End Function
        Public Function ReplaceChuoi(ByVal chuoi As String) As String
            Dim convert As String = Global.ReplaceChuoi.bodau(chuoi).Replace(" ", "-")
            Return convert
        End Function
        Public Function FormatURL(ByVal sitem As String, ByVal strID As String, ByVal strLink As String) As String
            Return "/" & sitem & "/" & strID & "/" & ReplaceChuoi(strLink) & ".htm"
        End Function
#End Region

    End Class

End Namespace
